#include <map>
#include <vector>
#ifndef __CUBE_STATE___
#define __CUBE_STATE___
#define ALL_COLOR_CLOCKS 54
#define TOTOAL_MOVABLE 20
struct cube_t{
	int8_t ep[12];
	int8_t cp[8];
	int8_t eo[12];
	int8_t co[8];
	cube_t(){
		for(int8_t i = 0 ; i  < 12 ; i++){
			if(i < 8){
				cp[i] = i;
				co[i] = 0;
			}
			ep[i] = i;
			eo[i] = 0;
		}
	}
};

/*********************************************


          ___2    ___2    ___1
         /__/|   /__/|   /__/|
         |__|/   |__|/   |__|/

      ___3             ___1
     /__/|            /__/|
     |__|/            |__|/

  ___3	  ___0	  ___0
 /__/|	 /__/|	 /__/|
 |__|/	 |__|/	 |__|/



         ___11            ___10
        /__/|            /__/|
        |__|/            |__|/



 ___9              ___8
/__/|             /__/|
|__|/             |__|/
	


       ___6     ___6     ___7
      /__/|    /__/|    /__/|
      |__|/    |__|/    |__|/
      
    ___7              ___5
   /__/|             /__/|
   |__|/             |__|/
   
 ___5	  ___4	   ___4
/__/|	 /__/|    /__/|
|__|/	 |__|/    |__|/








*************************************************
scan you cube with  following order
sample : BBBBBBBFBLLLLLLLLFUUUUUUUUURRRRRRFRRRBLFFFFFFDDDDDDDDD
************************************************
------------------------------------------------------
             |1   2   3|
             |4   5   6|
             |7   8   9|
------------------------------------------------------
|10  11  12| |19  20  21| |28  29  30|
|13  14  15| |22  23  24| |31  32  33|
|16  17  18| |25  26  27| |34  35  36|
-----------------------------------------------------
             |37  38  39|
             |40  41  42|
             |43  44  45|
------------------------------------------------------
             |46  47  48|
             |49  50  51|
             |52  53  54|
************************************************/




 
static const int8_t face_edges[6][4] = {
	{  0,  1,  2,  3},   // U   
	{  4,  7,  6,  5},   // D
	{  0,  9,  4,  8},   // F
	{  2, 10,  6, 11},   // B
	{  3, 11,  7,  9},   // L
	{  1,  8,  5, 10},   // R
};
static const int8_t face_cornors[6][4] ={
	{   0,  1,  2,  3 },   // U   
	{   4,  5,  6,  7 },   // D
	{   0,  3,  5,  4 },   // F
	{   2,  1,  7,  6 },   // B
	{   3,  2,  6,  5 },   // L
	{   1,  0,  4,  7 },   // R
};
static const int8_t cornors_map[8][3] ={
	{   27,39,34}, 
	{   21,28,9 },   
	{   19, 7,12},   
	{   25,18,37},   
	{   48,36,45},   
 	{   46,43,16},   
	{   52,10,1},   
	{   54,3,30}, 
};
static const int8_t edges_map[12][2] ={
	{   26,38}, 
	{   24,31},   
	{   20,8},   
	{   22,15},
	{   47,44}, 
	{   51,33},   
 	{   53,2},   
	{   49,13},   
	{	42,35}, 
	{	40,17},
	{	6,29},
	{	4,11} 
	

};
static const char* cornors[8]{
	"UFR",
	"URB",
	"UBL",
	"ULF",
	"DRF",
	"DFL",	
	"DLB",
	"DBR"		
};
static const char* edges[12]{
	"UF",
	"UR",
	"UB",
	"UL",
	"DF",
	"DR",	
	"DB",
	"DL",	
	"FR",
	"FL",
	"BR",	
	"BL"
};

class cubeState
{
public:
	cubeState(){}
	~cubeState(){}
	static cube_t moveRotate(int move,cube_t& cube);
	static cube_t generateCube(char *str);
private:


};
#endif
